package cn.com.surker.sale.dao;

import cn.com.surker.sale.entity.SaleContractBill;
import cn.com.surker.vo.sale.SaleBilVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 销售结算信息表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-05-20
 */
public interface SaleContractBillDao extends BaseMapper<SaleContractBill> {


    IPage<SaleBilVO> queryPage(Page<SaleBilVO> page, @Param("search") String search,@Param("startDate")String startDate,@Param("endDate")String endDate,@Param("orgId")String orgId);

    /**
     * 统计累计结算金额
     * @param today
     * @param orgId
     * @param conId
     * @return
     */
    List<SaleContractBill> totalBill(String today, Long orgId, Long conId);

    /**
     * 根据更新时间统计累计结算金额
     * @param startTime
     * @param endTime
     * @param orgId
     * @param conId
     * @return
     */
    List<SaleContractBill> totalBillV1(String startTime, String endTime, Long orgId, Long conId);

}
